<?php
	include_once('../modelo/db.php');
	$db = new db();
	$cedula = $_POST['cedula'];	
	$sql = 'SELECT * FROM pacientes WHERE cedula LIKE "'.$cedula.'%"';
	$db->query($sql);
	$cont='
	<table rules="all" border="1" width="80%;" class="tgenerales">
		<tr>
			<th>Cedula</th>
			<th>Nombres</th>
			<th>Apellidos</th>
			<th>Edad</th>
			<th></th>
		</tr>
	';
	while($rs = $db->fetch()){
		$cont.='
		<tr>
			<td>'.$rs['cedula'].'</td>
			<td>'.$rs['nombres'].'</td>
			<td>'.$rs['apellidos'].'</td>
			<td>'.$rs['edad'].'</td>
			<td><a href="./?option=verexpediente&id='.$rs['id'].'"><input type="button" value="Ver Expediente"></a></td>
		</tr>
		';
	}
	$cont.='</table>';
	echo $cont;
?>